<?php 
/**
 * Класс, который реализовует базовые настройки PHP-Ext
 *
 */

class FRM_View_Ext_Form_Template_SimpleDouble extends FRM_View_Ext_Form_Template_Abstract
{

	protected  function init(){
		
		if (count($this->langs))
		{
			$tabPanel = new PhpExt_TabPanel();
			$tabPanel ->setPlain(true)
			          ->setActiveTab(0)
			          ->setCssStyle("padding:10px 10px 0px 10px;")
			          ->setHeight(120);	

			foreach ($this->langs as $k=>$v) {
				$this->zones[$k] = new PhpExt_Panel();
				$this->zones[$k]   ->setTitle($v)
							       ->setLayout(new PhpExt_Layout_FormLayout())
							       ->setAutoHeight(true);

				$tabPanel->addItem($this->zones[$k]);
			}
			
			
			$this->form->addItem($tabPanel);
		}
		
		$columnPanel = new PhpExt_Panel();
		// using ColumnLayout
		$columnPanel->setBorder(false)
		             ->setLayout(new PhpExt_Layout_ColumnLayout());
		$this->form->addItem($columnPanel);

		//- First column
		$this->zones[0] = new PhpExt_Panel();
		// Use FormLayout to enable field labels and autoarrange fields on the panel
		$this->zones[0]->setBorder(false)
		             ->setLayout(new PhpExt_Layout_FormLayout());
		             
		//- Second column
		$this->zones[1] = new PhpExt_Panel();
		// Use FormLayout to enable field labels and autoarrange fields on the panel
		$this->zones[1]->setBorder(false)
		             ->setLayout(new PhpExt_Layout_FormLayout());

		// adds the panel as a 50% column using ColumnLayoutData           
		$columnPanel->addItem($this->zones[0], new PhpExt_Layout_ColumnLayoutData(0.5)); 
		$columnPanel->addItem($this->zones[1], new PhpExt_Layout_ColumnLayoutData(0.5)); 
	
	}
	
}